# http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/sun/reflect/ReflectionFactory.java

(javaImport
  sun.reflect.NativeConstructorAccessorImpl
  (java
    security.AccessController
    lang.Class)
  (java.lang.reflect
    Constructor
    Field) )

(de newClassInstance ()
  (let (Constructor (.getDeclaredConstructor> Class.class
                      (array Class.class) )
        getConstructorField (.getDeclaredField> T Constructor.class)
        Clazz (getConstructorField "clazz")
        ConstructorAccessor (getConstructorField "constructorAccessor")
        NativeConstructorAccessorConstructor (.getDeclaredConstructor> NativeConstructorAccessorImpl.class
                                               (list Constructor.class) ) )
    (mapc '.setAccessible>
      (list Clazz ConstructorAccessor)
      (circ T) )
    (.set> Clazz Constructor Object.class)
    (.setAccessible> Constructor T)
    (.setAccessible> NativeConstructorAccessorConstructor T)
    (.set> Clazz Constructor Class.class)
    (.set> ConstructorAccessor Constructor
      (.newInstance> NativeConstructorAccessorConstructor
        (list Constructor) ) )
    '(.newInstance> Constructor (array) )
    NIL) )